package ar.com.mindset.geometrics.colorSchemes {
	import ar.com.mindset.geometrics.ColorScheme;
	import ar.com.mindset.geometrics.MapItem;
	import ar.com.mindset.geometrics.RegionData;
	
	import com.degrafa.paint.SolidFill;

	public class SolidColorScheme extends ColorScheme {
		private var _color:Object;
		private var _alpha:Number;


		public function get color():Object {
			return _color
		}

		public function set color(value:Object):void {
			_color=value;
		}
		
		public function get alpha():Number {
			return _alpha;
		}

		public function set alpha(value:Number):void {
			_alpha=value;
		}		

		public function SolidColorScheme(color:Object="#FFFFFF", alpha:Number=1) {
			_color=color;
			_alpha=alpha;
		}

		public override function prepare(mapItem:MapItem, regionData:RegionData):void {
			var solidFill:SolidFill=new SolidFill(_color, _alpha)
			mapItem.fillcolor=solidFill;
		}

		public function toString():String {
			return "Solid color";
		}
	}
}